﻿#ifndef PUBLICDEFINE_H
#define PUBLICDEFINE_H

//π值宏
#define PI 3.141592654

//安全释放指针
#define SAFE_DELETE(p) \
{ \
    if(nullptr != p) \
    { \
        delete p; \
        p = nullptr; \
    } \
}

//安全释放数组指针
#define SAFE_DELETE_A(pArr) \
{ \
    if(nullptr != pArr) \
    { \
        delete[] pArr; \
        pArr = nullptr; \
    } \
}

//中文字符转换（内部使用此编码）
//°(度)
#define def_Degree \302\260
//′(分)
#define def_Minutes \342\200\262
//″(秒)
#define def_Second \342\200\263
//²(平方)
#define def_Square \302\262
//³(立方)
#define def_Cube \302\263
//条形料场堆料算法数量
#define def_StcNum 4
//条形料场取料算法数量
#define def_RecNum 2
//圆形料场堆料算法数量
#define def_CirStcNum 1
//圆形料场取料算法数量
#define def_CirRecNum 1

//测点文件名
const QString g_sDeviceTagFile = "/config/tag/deviceTag.csv";
const QString g_sInnerTagFile = "/config/tag/innerTag.csv";
const QString g_sOuterTagFile = "/config/tag/outerTag.csv";
const QString g_sForwardTagFile = "/config/tag/forwardTag.csv";

#endif // PUBLICDEFINE_H
